import { useParams } from 'react-router-dom';

import VulnerableTemplate from '@/components/VulnerableTemplate';

import RceExec from './level/RceExec';
import RcePing from './level/RcePing';

const Rce = () => {
  const { level } = useParams();
  const levelMap: any = {
    ping: RcePing,
    exec: RceExec,
  };

  return <VulnerableTemplate {...levelMap[level!]} />;
};

export default Rce;
